package day1103.demo04;

import java.util.function.Function;

/**
 * @program: qy158
 * @description:
 * @author: 闫克起2
 * @create: 2022-11-03 10:55
 **/
public class TestFunction {
    public static void main(String[] args) {
//  R apply(T t);
        Function<String,Integer> f=t->t.length();

        fun(f,"good evening");

    }
    public static void fun(Function<String,Integer> f,String str){
        Integer apply = f.apply(str);
        System.out.println(apply);
    }

}
